<%@ page import="java.text.DateFormat" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %><%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/2/17
  Time: 20:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>显示当前日期</title>
</head>
<body>
<%
    DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
    Date date = new Date();
    String now = df.format(date);
%>
今天的日期是: <%= now %>
<br>
</body>
</html>
